package com.schoolET.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户商品交易
 * </p>
 *
 * @author lin
 * @since 2024-06-01
 */
@Getter
@Setter
@TableName("order_management")
@ApiModel(value = "OrderManagement对象", description = "用户商品交易")
public class OrderManagement implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("商品id")
    private Integer goodsId;

    @ApiModelProperty("发布者id")
    private Integer releaseId;

    @ApiModelProperty("上架状态 0上架 1下架")
    private Integer productStatus;

    @ApiModelProperty("交易状态 0交易中 1未交易 2交易完成")
    private Integer tradingStatus;

    @ApiModelProperty("买家id 默认-1 没有买家id")
    private Integer buyerId;

    @ApiModelProperty("买家地址")
    private String buyerAddress;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("有效字段")
    private Integer flag;
}
